home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / quicktime / basics / mfc simpleedit.win / mainfrm.cpp next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  1.7 KB  |  78 lines

  1. // MainFrm.cpp : implementation of the CMainFrame class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "SimpleEditMFC.h"
  6. #include "SimpleEditMFCDoc.h"
  7. #include "SimpleEditMFCView.h"
  8.  
  9.  
  10. #include "MainFrm.h"
  11.  
  12. #ifdef _DEBUG
  13. #define new DEBUG_NEW
  14. #undef THIS_FILE
  15. static char THIS_FILE[] = __FILE__;
  16. #endif
  17.  
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CMainFrame
  20.  
  21. IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
  22.  
  23. BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
  24.     //{{AFX_MSG_MAP(CMainFrame)
  25.     ON_WM_ERASEBKGND()
  26.     //}}AFX_MSG_MAP
  27. END_MESSAGE_MAP()
  28.  
  29. /////////////////////////////////////////////////////////////////////////////
  30. // CMainFrame construction/destruction
  31.  
  32. CMainFrame::CMainFrame()
  33. {
  34.     // TODO: add member initialization code here
  35.     
  36. }
  37.  
  38. CMainFrame::~CMainFrame()
  39. {
  40. }
  41.  
  42. BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
  43. {
  44.     // TODO: Modify the Window class or styles here by modifying
  45.     //  the CREATESTRUCT cs
  46.       // Set the attributes for the Movie Window
  47.     cs.style ^= WS_THICKFRAME | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_VISIBLE;
  48.  
  49.     return CFrameWnd::PreCreateWindow(cs);
  50. }
  51.  
  52. /////////////////////////////////////////////////////////////////////////////
  53. // CMainFrame diagnostics
  54.  
  55. #ifdef _DEBUG
  56. void CMainFrame::AssertValid() const
  57. {
  58.     CFrameWnd::AssertValid();
  59. }
  60.  
  61. void CMainFrame::Dump(CDumpContext& dc) const
  62. {
  63.     CFrameWnd::Dump(dc);
  64. }
  65.  
  66. #endif //_DEBUG
  67.  
  68. /////////////////////////////////////////////////////////////////////////////
  69. // CMainFrame message handlers
  70.  
  71. LRESULT CMainFrame::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) 
  72. {
  73.     CSimpleEditMFCView *theView = (CSimpleEditMFCView *)GetActiveView();
  74.  
  75.     return CFrameWnd::WindowProc(message, wParam, lParam);
  76. }
  77.  
  78.